<?php
return [
    'components' => [
		'sphinx' => [
            'class' => 'yii\sphinx\Connection',
            'dsn' => 'mysql:host=123.57.219.103;port=3306;',
            'username' => 'root',
            'password' => 'new-password',
        ],
        //数据库主从配置
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=120.24.185.210;dbname=yiming',
            'username' => 'school',
            'password' => 'root',
            'charset' => 'utf8',
            'tablePrefix' => 'edu_',
            /*
            'masterConfig' => [
                'username' => 'yiming',
                'password' => 'yiming',
            ],
            'masters' => [
                ['dsn' => 'mysql:host=10.51.59.15;dbname=yiming'],
            ],
            'slaveConfig' => [
                'username' => 'root',
                'password' => 'root',
            ],
            'slaves' => [
                ['dsn' => 'mysql:host=10.172.178.0;dbname=yiming'],
            ],
            */
        ],

        //第三方组件登陆配置
        'authClientCollection' => [
            'class' => 'yii\authclient\Collection',
            'clients' => [
                'qq' => [
                    'class' => 'common\components\QqOAuth',
                    'clientId' => '101265145',
                    'clientSecret' => '9ce7a8e350cfac30bbc0c1cd7c359283',
                    'returnUrl' => 'site/successcallback',
                ],
            ],
        ],
        /*
		https://graph.qq.com/oauth/show?which=error&display=pc&error=100010&client_id=101265145&response_type=code&redirect_uri=http%3A%2F%2Fwww.bwphp.com%2Findex.php%2Fsite%2FsuccessCallback&xoauth_displayname=My%20Application&scope=get_user_info
		*/
        
        
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
    ],
];
